﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<DNA.Models.User>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Usuários</h2>
    <img src="http://localhost:61221/Content/themes/base/images/user_edit.png" />
<p>
    <%: Html.ActionLink("Novo Usuário", "Create") %><br />

</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Lastname
        </th>
        <th>
            Email
        </th>
        <th>
            Password
        </th>
        <th>
            Perfil
        </th>
        <th>
            DNA_Id
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.Name) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Lastname) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Password) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Perfil.Name) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DNA_Id) %>
        </td>
        <td>
            
            <%: Html.ActionLink("Editar", "Edit", new { id=item.Id }) %> |
            <%: Html.ActionLink("Detalhes", "Details", new { id=item.Id }) %> |
            <%: Html.ActionLink("Deletar", "Delete", new { id=item.Id }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
